g05faf
g05faf
© Numerical Algorithms Group, 2002.
Purpose
G05FAF Generates a vector of pseudo-random numbers from a uniform
distribution
Synopsis
[x] = g05faf(a,b,n)
Description
If a=0 and b=1, G05FAF returns the next n values y from the
i
basic uniform (0,1) generator (see G05CAF for details).
For other values of a and b, G05FAF applies the transformation
x =a+(b-a)y
i i
The routine ensures that the values x lie in the closed interval
i
[a,b].
G05FAF always generates exactly the same pseudo-random numbers as
would n consecutive calls of G05CAF, and on vector-processing
machines is likely to be much faster.
Parameters
g05faf
Required Input Arguments:
a real
b real
n integer
Output Arguments:
x (n) real